home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / DTS Japan-Sample Code / AppleEvent•MacApp2.0•QuickDraw / MDraw.cp < prev    next >
Encoding:
Text File  |  1992-02-05  |  835 b   |  28 lines  |  [TEXT/MPS ]

  1. // Copyright © 1989 Apple Computer, Inc. All rights reserved.
  2.  
  3. #include "UDraw.h"
  4.  
  5. TDrawApplication    *gDrawApplication;
  6.  
  7. #pragma segment Main
  8.  
  9. void main()
  10. {
  11.     InitToolBox();                                            // essential toolbox and utilities
  12.     if (ValidateConfiguration(&gConfiguration)){    // make sure we can run
  13.         InitUMacApp(8);                                     // initialize MacApp; 8 calls to MoreMasters
  14.         InitUDialog();
  15.         InitUGridView();
  16.         InitUPrinting();
  17.         
  18.         FailOSErr(AEObjectInit());                        // initialize the Object Support Library
  19.         
  20.         gDrawApplication = new TDrawApplication;    // create an application object
  21.         FailNIL(gDrawApplication);                        // make sure enough memory
  22.         gDrawApplication->IDrawApplication();        // initialize the application
  23.         gDrawApplication->Run();                        // run the application
  24.     }
  25.     else
  26.         StdAlert(phUnsupportedConfiguration);        // tell user we can't run
  27. }
  28.